import Vue from 'vue';
import App from './App.vue';
import router from './router';
import ElementUI from 'element-ui';
import global from '@/global';
// import axios from 'axios'
import 'element-ui/lib/theme-chalk/index.css'; // 默认主题
// import './assets/css/theme-green/index.css'; // 浅绿色主题
import './assets/css/icon.css';
import './assets/css/main.css'
import 'babel-polyfill';
import 'github-markdown-css'
import 'highlight.js/styles/github.css';
import '../jsmpeg.min'
import * as echarts from 'echarts';

//设置反向代理，前端请求默认发送到http://localhost:8443/api
var axios = require("axios");
axios.defaults.baseURL = 'http://127.0.0.1:8000/api';

Vue.prototype.$axios = axios;
Vue.prototype.$echarts = echarts
Vue.prototype.GLOBAL = global;//挂载到Vue实例上面

Vue.config.productionTip = false;

// 使用md文件
// Vue.prototype.md2html = (md) => {
//     let converter = new showdown.Converter();
//     let text = md.toString();
//     let html = converter.makeHtml(text);
//     return html
// };

Vue.use(ElementUI, {
    size: 'small'
});

new Vue({
    router,
    render: h => h(App)
}).$mount('#app');
